package edu.object_oriented.demo;

class Phone {
    //内存大小
    int memory;
    //cpu类型
    String cpuType;
    //屏幕大小
    double screen;
    //语言
    String lang;

    Phone(){
        lang = "english";
    }

    public Phone(String language){
        lang = language;
    }




    //功能
    void internet(){
        System.out.println("上网");
    }

    void call(){
        System.out.println("打电话");
    }

    void getMsg(){
        System.out.println("内存"+memory+" cpu:"+cpuType+" 屏幕："+screen);
    }

    public static void main(String[] args) {
        Phone phone = new Phone();
        phone.memory = 8;
        phone.cpuType = "麒麟9000";
        phone.screen = 6.25;

        phone.internet();
        phone.call();
        phone.getMsg();

        Phone phone2 = new Phone("中文");
        System.out.println(phone2.lang);



    }









}
